package com.kateba.android.blueinput;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TableLayout;
import android.widget.TextView;

public class GUITab4 extends RelativeLayout
{
  public ImageButton[] m_IB = new ImageButton[1];
  Spinner m_LayoutSpin;
  private int[] m_nIBImgs;

  public GUITab4(Context paramContext)
  {
    super(paramContext);
    int[] arrayOfInt = new int[1];
    arrayOfInt[0] = 2130837512;
    this.m_nIBImgs = arrayOfInt;
    int i = Singleton.getInstance().applySCRDensity(paramContext, Singleton.g_nSpacing);
    int j = Singleton.getInstance().applySCRDensity(paramContext, Singleton.g_nButPadding);
    setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
    setPadding(i, i, i, i);
    setBackgroundColor(Singleton.clrBackgroundApp);
    LinearLayout localLinearLayout1 = new LinearLayout(paramContext);
    localLinearLayout1.setId(34120);
    localLinearLayout1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
    localLinearLayout1.setOrientation(0);
    localLinearLayout1.setPadding(0, i, 0, 0);
    LinearLayout localLinearLayout2 = new LinearLayout(paramContext);
    localLinearLayout2.setBackgroundDrawable(getResources().getDrawable(2130837518));
    localLinearLayout2.setOrientation(0);
    localLinearLayout2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
    localLinearLayout2.setPadding(i, i, i, i);
    for (int k = 0; ; k++)
    {
      if (k >= this.m_IB.length)
      {
        localLinearLayout1.addView(localLinearLayout2);
        RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-1, -2);
        localLayoutParams2.addRule(12);
        localLayoutParams2.addRule(14);
        addView(localLinearLayout1, localLayoutParams2);
        LinearLayout localLinearLayout3 = new LinearLayout(paramContext);
        localLinearLayout3.setBackgroundDrawable(getResources().getDrawable(2130837518));
        localLinearLayout3.setOrientation(1);
        localLinearLayout3.setPadding(i, i, i, i);
        RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-1, -1);
        localLayoutParams3.addRule(10);
        localLayoutParams3.addRule(14);
        localLayoutParams3.addRule(2, 34120);
        addView(localLinearLayout3, localLayoutParams3);
        ScrollView localScrollView = new ScrollView(paramContext);
        localScrollView.setFillViewport(false);
        localLinearLayout3.addView(localScrollView);
        LinearLayout localLinearLayout4 = new LinearLayout(paramContext);
        localLinearLayout4.setOrientation(1);
        localScrollView.addView(localLinearLayout4);
        TextView localTextView1 = new TextView(paramContext);
        localTextView1.setText(getResources().getString(2131034153));
        localTextView1.setTypeface(Typeface.DEFAULT, 1);
        localTextView1.setTextSize(2, Singleton.g_nTitleSize);
        localTextView1.setTextColor(Singleton.clrText);
        localTextView1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localLinearLayout4.addView(localTextView1);
        CheckBox localCheckBox1 = new CheckBox(paramContext);
        localCheckBox1.setText(getResources().getString(2131034155));
        localCheckBox1.setTextSize(2, Singleton.g_nSubtitleSize);
        localCheckBox1.setTextColor(Singleton.clrSubText);
        localCheckBox1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localCheckBox1.setId(511);
        localCheckBox1.setChecked(Singleton.getInstance().m_sett.getDebug());
        localCheckBox1.setOnClickListener((View.OnClickListener)paramContext);
        localLinearLayout4.addView(localCheckBox1);
        CheckBox localCheckBox2 = new CheckBox(paramContext);
        localCheckBox2.setText(getResources().getString(2131034156));
        localCheckBox2.setTextSize(2, Singleton.g_nSubtitleSize);
        localCheckBox2.setTextColor(Singleton.clrSubText);
        localCheckBox2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localCheckBox2.setId(512);
        localCheckBox2.setChecked(Singleton.getInstance().m_sett.getHints());
        localCheckBox2.setOnClickListener((View.OnClickListener)paramContext);
        localLinearLayout4.addView(localCheckBox2);
        TextView localTextView2 = new TextView(paramContext);
        localTextView2.setText(getResources().getString(2131034132));
        localTextView2.setTypeface(Typeface.DEFAULT, 1);
        localTextView2.setTextSize(2, Singleton.g_nSubtitleSize);
        localTextView2.setTextColor(Singleton.clrText);
        localTextView2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localLinearLayout4.addView(localTextView2);
        CheckBox localCheckBox3 = new CheckBox(paramContext);
        localCheckBox3.setText(getResources().getString(2131034133));
        localCheckBox3.setTextSize(2, Singleton.g_nSubtitleSize);
        localCheckBox3.setTextColor(Singleton.clrSubText);
        localCheckBox3.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localCheckBox3.setId(505);
        localCheckBox3.setChecked(Singleton.getInstance().m_sett.getMouseSounds());
        localCheckBox3.setOnClickListener((View.OnClickListener)paramContext);
        localLinearLayout4.addView(localCheckBox3);
        TextView localTextView3 = new TextView(paramContext);
        localTextView3.setText(getResources().getString(2131034134));
        localTextView3.setTypeface(Typeface.DEFAULT, 1);
        localTextView3.setTextSize(2, Singleton.g_nSubtitleSize);
        localTextView3.setTextColor(Singleton.clrText);
        localTextView3.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localLinearLayout4.addView(localTextView3);
        CheckBox localCheckBox4 = new CheckBox(paramContext);
        localCheckBox4.setText(getResources().getString(2131034135));
        localCheckBox4.setTextSize(2, Singleton.g_nSubtitleSize);
        localCheckBox4.setTextColor(Singleton.clrSubText);
        localCheckBox4.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localCheckBox4.setId(506);
        localCheckBox4.setChecked(Singleton.getInstance().m_sett.getKBSounds());
        localCheckBox4.setOnClickListener((View.OnClickListener)paramContext);
        localLinearLayout4.addView(localCheckBox4);
        TextView localTextView4 = new TextView(paramContext);
        localTextView4.setText(getResources().getString(2131034136));
        localTextView4.setTypeface(Typeface.DEFAULT, 1);
        localTextView4.setTextSize(2, Singleton.g_nSubtitleSize);
        localTextView4.setTextColor(Singleton.clrText);
        localTextView4.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localLinearLayout4.addView(localTextView4);
        Spinner localSpinner = new Spinner(paramContext);
        this.m_LayoutSpin = localSpinner;
        this.m_LayoutSpin.setId(513);
        this.m_LayoutSpin.setOnItemSelectedListener((AdapterView.OnItemSelectedListener)paramContext);
        localLinearLayout4.addView(this.m_LayoutSpin);
        String[] arrayOfString = new String[10];
        arrayOfString[0] = getResources().getString(2131034137);
        arrayOfString[1] = getResources().getString(2131034138);
        arrayOfString[2] = getResources().getString(2131034139);
        arrayOfString[3] = getResources().getString(2131034140);
        arrayOfString[4] = getResources().getString(2131034141);
        arrayOfString[5] = getResources().getString(2131034142);
        arrayOfString[6] = getResources().getString(2131034143);
        arrayOfString[7] = getResources().getString(2131034144);
        arrayOfString[8] = getResources().getString(2131034145);
        arrayOfString[9] = getResources().getString(2131034146);
        ArrayAdapter localArrayAdapter = new ArrayAdapter(paramContext, 17367048, arrayOfString);
        localArrayAdapter.setDropDownViewResource(17367058);
        this.m_LayoutSpin.setAdapter(localArrayAdapter);
        this.m_LayoutSpin.setSelection(Singleton.getInstance().m_sett.getLayoutID());
        return;
      }
      ImageButton[] arrayOfImageButton = this.m_IB;
      ImageButton localImageButton = new ImageButton(paramContext);
      arrayOfImageButton[k] = localImageButton;
      this.m_IB[k].setBackgroundDrawable(getResources().getDrawable(2130837519));
      this.m_IB[k].setImageDrawable(getResources().getDrawable(this.m_nIBImgs[k]));
      this.m_IB[k].setPadding(j, j, j, j);
      this.m_IB[k].setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));
      this.m_IB[k].setOnClickListener((View.OnClickListener)paramContext);
      RelativeLayout localRelativeLayout = new RelativeLayout(paramContext);
      RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-2, -2);
      localLayoutParams1.addRule(13);
      localRelativeLayout.addView(this.m_IB[k], localLayoutParams1);
      localLinearLayout2.addView(localRelativeLayout, new TableLayout.LayoutParams(-1, -1, 1.0F));
    }
  }

  public GUITab4(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    int[] arrayOfInt = new int[1];
    arrayOfInt[0] = 2130837512;
    this.m_nIBImgs = arrayOfInt;
  }
}